
CSF=cscope.files

FP="`pwd`"


if [ "$1" == "out" ]; then
    echo "generating $FP/cscope.out";
    cscope -b -i cscope.files -f cscope.out ;
elif [ "$1" == "files" ]; then
    echo "generating $FP/cscope.files";
    find $FP -type f -name "*.[ch]" > $CSF;
    find $FP -type f -name "*.cpp" >> $CSF;
elif [ "$1" == "addfiles" ]; then
    echo "adding $FP/cscope.files";
    find $FP -type f -name "*.[ch]">> $CSF;
    find $FP -type f -name "*.cpp" >> $CSF;
else
    echo "missing parameter: out or files or add or add files";
fi


